package indigo.ueditor;

public class UEditorException extends RuntimeException {
	private static final long serialVersionUID = -4636446589921166760L;

	private final UEditorState state;

	public UEditorException(UEditorState state, Throwable cause) {
		super(state.getMessage(), cause);
		this.state = state;
	}

	public UEditorException(UEditorState state) {
		super(state.getMessage());
		this.state = state;
	}

	public UEditorState getState() {
		return state;
	}
}
